const filter = {
  progressive (listener, options) {
    if (listener.el.getAttribute('imgtype') === 'aside') {  // 首页广告
      listener.el.setAttribute('lazy-progressive', 'true')
      listener.loading = require('../../assets/images/banner/asideBanner.jpg')
    } else if (listener.el.getAttribute('imgtype') === 'special') {   // 今日特惠
      listener.el.setAttribute('lazy-progressive', 'true')
      listener.loading = require('../../assets/images/banner/special.jpg')
    } else if (listener.el.getAttribute('imgtype') === 'goods') {  // 商品详情-大轮播图
      listener.el.setAttribute('lazy-progressive', 'true')
      listener.loading = require('../../assets/images/banner/goodsbig.jpg')
    } else if (listener.el.getAttribute('imgtype') === 'smallgoods') {  // 商品详情-小轮播图
      listener.el.setAttribute('lazy-progressive', 'true')
      listener.loading = require('../../assets/images/banner/smallgoods.jpg')
    } else if (listener.el.getAttribute('imgtype') === 'recommend') {   // 商品推荐
      listener.el.setAttribute('lazy-progressive', 'true')
      listener.loading = require('../../assets/images/banner/recommend.jpg')
    } else if (listener.el.getAttribute('imgtype') === 'orderImg') {  // 个人中心 订单列表
      listener.el.setAttribute('lazy-progressive', 'true')
      listener.loading = require('../../assets/images/banner/order.jpg')
    } else if (listener.el.getAttribute('imgtype') === 'commodity') {  // 首页的商品列表图片
      listener.el.setAttribute('lazy-progressive', 'true')
      listener.loading = require('../../assets/images/banner/commodity.jpg')
    }
  }
}
export default filter
